/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package b2ccommon;

import java.util.HashMap;

/**
 *
 * @author David
 */
public class B2CCommon {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        System.out.println("-* Testing *-");
        HashMap<String, String> fullGroupContracts = new HashMap<String, String>();
        //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for (int year = 15; year <= 18; year++) {
            for (int month = 1; month <= 12; month++) {
                for (int numGrp = 0; numGrp <= 9; numGrp++) {
                    //    System.out.println("(1) Contrato: F" + numGrp + " Vcto: " + month + " " + year);
                }
                //break;
            }
        }

        for (int year = 15; year <= 18; year++) {
            for (int month = 1; month <= 12; month++) {
                for (int numGrp = 0; numGrp <= 9; numGrp++) {
                    for (int cicle = 0; cicle <= 1; cicle++) {
                        System.out.println("(2) Contrato: F" + numGrp + " Vcto: " + month + " " + year);
                    }
                }
                //break;
            }
        }

        HashMap<Integer, String> fullKeyGroupContracts = new HashMap<Integer, String>();
        int numKey = 1;
        // Se supone la curva de puntos forward desde el 2015 al 2030
        for (int year = 15; year <= 20; year++) {
            for (int month = 1; month <= 12; month++) {
                if (month <= 9) {
                    System.out.println("(3) = " + numKey + " = Contrato: F" + " Vcto: 0" + month + " " + year);
                    fullKeyGroupContracts.put(numKey, "0" + String.valueOf(month).concat(String.valueOf(year)));
                } else {
                    System.out.println("(3) = " + numKey + " = Contrato: F" + " Vcto: " + month + " " + year);
                    fullKeyGroupContracts.put(numKey, String.valueOf(month).concat(String.valueOf(year)));
                }
                numKey++;
            }
        }

        System.out.println("Size = " + fullKeyGroupContracts.size());
        int key = 1;
        for (String vcto : fullKeyGroupContracts.values()) {
            System.out.println("Info = " + vcto);
            for (int numGrp = 0; numGrp <= 9; numGrp++) {
                for (int cicle = 0; cicle <= 1; cicle++) {

                    System.out.println("(-) Contrato: " + fullKeyGroupContracts.get(key) + " " + numGrp + " key: " + key);
                    fullGroupContracts.put(fullKeyGroupContracts.get(key), "F" + String.valueOf(numGrp));
                    //break;
                }
                break;
            }
            key++;
        }
        int key2 = 1;
        for (String vcto1 : fullKeyGroupContracts.values()) {
            System.out.println("Info = " + vcto1);
            System.out.println("(-) Contrato: " + fullKeyGroupContracts.get(key2) + " " + "" + " key: " + key2);
                        //fullGroupContracts.put(fullKeyGroupContracts.get(key), "F" + String.valueOf(""));
            //break;
            key2++;
        }//break;

    }
}
